import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: 'HSM-UI',
  description: 'HSM UI 组件库',
  lastUpdated: true,
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    logo: '/logo.svg',
    search: {
      provider: 'local',
    },
    nav: [
      { text: '首页', link: '/' },
      { text: '组件', link: '/components/' },
      { text: '工具', link: '/utils/i18n/' },
    ],
    sidebar: {
      '/components': [
        {
          text: '起步',
          link: '/components/',
        },
        {
          text: '按钮',
          link: '/components/button/',
        },
        {
          text: '通知',
          link: '/components/notice/',
        },
      ],
      '/utils': [
        {
          text: '国际化',
          link: '/utils/i18n/',
        },
        {
          text: '主题样式',
          link: '/utils/style/',
        },
      ],
      '/dev': [
        {
          text: '开发文档',
          link: '/dev/',
        },
        {
          text: '开发一个组件',
          link: '/dev/component',
        },
        {
          text: '样式类名',
          link: '/dev/class',
        },
        {
          text: '主题样式',
          link: '/dev/style',
        },
        {
          text: '国际化',
          link: '/dev/i18n',
        },
        {
          text: '图标',
          link: '/dev/icon',
        },
        {
          text: '单元测试',
          link: '/dev/test',
        },
        {
          text: '打包发布',
          link: '/dev/build',
        },
        {
          text: '代码提交',
          link: '/dev/git',
        },
      ],
    },

    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' },
    ],
  },
  rewrites: {
    // 'docs/(.*)': '(.*)'  // 路径映射
  },
})
